package com.systemframework.enums;

/**
 * @author summer
 * @date 2022-10-21 21:22
 **/
public enum ResultCodeEnum {

    ACCESS_UNAUTHORIZED(301, "访问未授权"),
    ERROR(500, "错误"),
    SUCCESS(200, "成功"),
    EXCEPTION(400, "系统异常"),
    FILE_NULL(503, "上传文件"),
    NULL_POINTER_EXCEPTION(561, "空指针错误"),
    SQL_EXCEPTION(562, "sql语法错误"),
    ARRAY_INDEX_OUT(563, "数组下标越界"),
    NUMBER(564, "数字格式异常"),
    CLASS_CAST(565, "类型转换类型"),
    ILLEGAL(566, "参数异常"),
    ERROR_USER_NAME_PASS(402, "用户名或密码错误"),
    BY_ZERO(567, "算术异常"),
    INVALID_TOKEN_MESSAGE(-2,"Token无效"),
    TOKEN_TIMEOUT_MESSAGE(-3,"Token已过期"),
    NOT_TOKEN_MESSAGE(-1,"未能读取到有效Token"),
    LICENSE_EXIT_TIME(-4,"授权证书已失效,请联系开发者"),
    USER_EXCEPTION(501,"用户已禁用请联系管理员"),
    ORDER_EXCEPTION(201,"");
    private final Integer code;
    private final String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer code() {
        return this.code;
    }

    public String msg() {
        return this.msg;
    }
}
